package cz.apnetis.fitweb.client;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;

import cz.apnetis.fitweb.shared.Food;

/** GWT async service */
public interface FoodServiceAsync {

  void save(Food food, AsyncCallback<String> callback) throws IllegalArgumentException;

  /** Remove given food from database */
  void remove(Food food, AsyncCallback<String> callback) throws IllegalArgumentException;

  /** List of all food of user */
  void allFood(AsyncCallback<List<Food>> callback);

  /** Food of given period
   * @param period period of year which is show
   * @param offset how many period in back is show, elsewhere is show current period
   * @param foods async reponse of server which return list of foods
   */
  void foodOfPeriod(int period, int offset, int timeZoneOffset, AsyncCallback<List<Food>> foods);
}
